.auth-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-container {
    width: 100%;
    max-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.auth-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.welcome-text {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    fill: #999;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
}

.input-icon input {
    width: 100%;
    padding: 8px 12px 8px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 38px;
}

.input-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
    outline: none;
}

.input-icon input::placeholder {
    color: #999;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    position: relative;
    padding-left: 24px;
}

.remember-me input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remember-me:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.remember-me input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input:checked ~ .checkmark:after {
    display: block;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 42px;
}

.submit-btn:hover {
    background: linear-gradient(to right, var(--primary-color), var(--primary-color-light));
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.15);
}

.submit-btn:active {
    transform: scale(0.98);
    background: var(--primary-color-dark);
    box-shadow: 0 2px 10px rgba(var(--primary-color-rgb), 0.1);
}

.submit-btn span {
    display: inline-block;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-arrow {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0.9;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn:hover span {
    transform: translateX(-3px);
}

.submit-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.submit-btn.loading {
    cursor: wait;
    background: var(--primary-color);
}

.submit-btn.loading span,
.submit-btn.loading .btn-arrow {
    opacity: 0;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

.submit-btn:disabled {
    background: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#registerForm {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#loginForm, #registerForm {
    animation: fadeIn 0.3s ease;
}

.social-login {
    margin-top: 20px;
    display: none;
}

.divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 70px);
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd);
}

.divider::after {
    right: 0;
    background: linear-gradient(to left, transparent, #ddd);
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #888;
    font-size: 13px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: #666;
    transition: fill 0.3s;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn.wechat:hover {
    background: #07c160;
}

.social-btn.qq:hover {
    background: #12b7f5;
}

.social-btn.github:hover {
    background: #24292e;
}

.social-btn:hover svg {
    fill: white;
}

@media (max-width: 480px) {
    .auth-box {
        padding: 20px;
        margin: 10px;
    }

    .social-buttons {
        gap: 10px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .auth-header {
        margin-bottom: 16px;
    }

    .tabs {
        margin-bottom: 16px;
    }
}

/* 添加输入提示样式 */
.input-tip {
    position: absolute;
    left: 0;
    top: 100%;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    display: none;
    z-index: 1;
    line-height: 1.4;
}

.input-icon input:focus + .input-tip {
    display: block;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 20px;
    padding: 0 4px;
}

.strength-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #ff4d4f;
    transition: all 0.3s ease;
}

.strength-bar.weak::after {
    width: 33.33%;
    background: #ff4d4f;
}

.strength-bar.medium::after {
    width: 66.66%;
    background: #faad14;
}

.strength-bar.strong::after {
    width: 100%;
    background: #52c41a;
}

.strength-text {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    display: block;
}

/* 务条款样式 */
.terms-privacy {
    margin: 12px 0;
}

.terms-privacy a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.terms-privacy a:hover {
    opacity: 0.8;
}

/* 错误提示样式 */
.input-icon.error input {
    border-color: #ff4d4f;
}

.input-icon.error .input-tip {
    color: #ff4d4f;
    display: block;
}

/* 加载状态 */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式优化 */
@media (max-width: 480px) {
    .auth-box {
        padding: 20px;
        margin: 10px;
    }

    .site-logo {
        font-size: 20px;
    }

    .input-icon input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 默认隐藏"隐藏密码"图标 */
.hide-password {
    display: none;
}

/* 当码可见时，显示"隐藏密码"图标，隐藏"显示密码"图标 */
.toggle-password.active .show-password {
    display: none;
}

.toggle-password.active .hide-password {
    display: block;
}

/* 添加 CSS 变量，用于按钮阴影颜色 */
:root {
    --primary-color-rgb: 24, 144, 255; /* 根据你的主题色调整RGB值 */
    --primary-color-light: #4096ff; /* 比主色更亮 */
    --primary-color-dark: #096dd9;  /* 比主色更暗 */
}

/* 响应式调整 */
@media (max-width: 480px) {
    .submit-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* 社交登录样式 */
.social-login {
    margin-top: 20px;
    display: none;
}

/* 只在登录表单激活时显示社交登录 */
#loginForm:not([style*="display: none"]) + .social-login {
    display: block;
}

/* 移除之前的规则 */
#registerForm + .social-login {
    display: none;
}

/* 调整最后一个表单组的间距 */
.form-group:last-of-type {
    margin-bottom: 20px;
}

/* 优化滚动条样式 */
.auth-box::-webkit-scrollbar {
    width: 6px;
}

.auth-box::-webkit-scrollbar-track {
    background: transparent;
}

.auth-box::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* 找回密码表单样式 */
#resetPasswordForm {
    display: none;
}

#resetPasswordForm .auth-header {
    margin-bottom: 30px;
}

#resetPasswordForm .form-group {
    margin-bottom: 28px;
}

#resetPasswordForm .input-tip {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    display: none;
    line-height: 1.4;
}

#resetPasswordForm .input-icon input:focus + .input-tip {
    display: block;
}

#resetPasswordForm .password-strength {
    margin-top: 24px;
}

#resetPasswordForm .form-group:last-of-type {
    margin-bottom: 20px;
}

#resetPasswordForm .input-icon.error .input-tip {
    color: #ff4d4f;
    display: block;
}

.form-footer {
    margin-top: 25px;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.back-to-login:hover {
    opacity: 0.8;
    transform: translateX(-3px);
}

.back-to-login::before {
    content: '←';
    margin-right: 6px;
    font-size: 16px;
}

/* 修改现有的 fadeIn 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* 验证码组样式 */
.verify-code-group {
    display: flex;
    gap: 10px;
}

.verify-code-group .input-icon {
    flex: 1;
}

.send-code-btn {
    padding: 0 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.send-code-btn:hover {
    background: var(--primary-color-light);
}

.send-code-btn:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* 验证码输入框样式 */
#verifyCode {
    letter-spacing: 2px;
    font-size: 16px;
} 